﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PSS4Publish.Repositories.Interfaces;

namespace PSS4Publish.Repositories
{
    public class ApplicationPoolRepository : GenericRepository<PSS4PublishEntities, ApplicationPool>, IApplicationPoolRepository
    {

        public ApplicationPool GetSingle(int fooId)
        {

            var query = GetAll().FirstOrDefault(x => x.ID == fooId);
            return query;
        }

        public ApplicationPool GetPoolByName(string poolName)
        {
            return Context.ApplicationPools.Where(x => x.Name == poolName).SingleOrDefault();
        }
    }
}
